package com.gtt.jr.constants;


/**
 * Comments Type Constants
 * 
 * @author Michael(gao12581@sina.com)
 * @date 2011-3-2 08:53:35
 * 
 */
public enum CommentsType {

	CONTAINER("container"), COMPANY("company");

	private String code;

	CommentsType(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public static CommentsType fromCode(String code) {
		for (CommentsType value : values()) {
			if (value.getCode().equalsIgnoreCase(code)) {
				return value;
			}
		}
		return null;
	}
}
